package internal

import (
	"net/http"
	"yutooaisdk/camera"
	"yutooaisdk/define"

	"github.com/gin-gonic/gin"
)

// PublicReply 公共响应（出参）
type PublicReply struct {
	Code int64 `json:"code,omitempty"`
	// 状态描述
	Msg string `json:"msg,omitempty"`
}

// 1.调用GetCameraList获取相机列表以及正在使用的相机
// 2.调用OpenCamera接口打开相机列表中的某个相机
func GetCameraList(c *gin.Context) {
	//Todo
	cameraList, _ := camera.GetList()
	c.JSON(http.StatusOK, gin.H{
		"status": &define.PublicReply{
			Code: 0,
			Msg:  "",
		},
		"selectedCamera": "",
		"cameraList":     cameraList,
	})
}
